package com.caption.controller;

import com.caption.remote.UserInfoRemote;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
@Slf4j
@RequestMapping("/payment")
public class PaymentController {

    @Autowired
    private UserInfoRemote userInfoRemote;

    @GetMapping("/pay")
    public String pay(){
         String user = userInfoRemote.info();
         log.info("pay user{}",user);
         return  "pay success";
    }
}
